package com.learning.mybatis.enums;

import com.learning.mybatis.function.DecryptEncryptUtils;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.function.Function;

/**
 * @author jukg
 * @date 2025/01/07 14:55
 * @description
 */
@Getter
@AllArgsConstructor
public enum DecryptEncryptEnum implements Function<String, String> {
    DECRYPT(){
        @Override
        public String apply(String s) {
            return DecryptEncryptUtils.sm4Decrypt(s);
        }
    },
    ENCRYPT(){
        @Override
        public String apply(String s) {
            return DecryptEncryptUtils.sm4Encrypt(s);
        }
    };

}
